home *** CD-ROM | disk | FTP | other *** search
- Path: news.ichange.com!newsmaster
- From: Jesse Liberty <jl@staff.ichange.com>
- Newsgroups: comp.lang.c++
- Subject: Re: NEWBIE : Quicksort
- Date: Thu, 28 Mar 1996 07:31:21 -0500
- Organization: AT&T
- Message-ID: <315A8699.3F8F@staff.ichange.com>
- References: <4j4ruf$gf4@news1.h1.usa.pipeline.com> <Pine.SOL.3.91.960325221334.202B-100000@orion> <3159337A.2DB5@staff.ichange.com> <Doxpq0.2t5@research.att.com>
- NNTP-Posting-Host: 140.244.99.60
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0 (Win95; I)
- CC: jl@staff.ichange.com
-
- Andrew Koenig wrote:
- >
- > In article <3159337A.2DB5@staff.ichange.com> Jesse Liberty <jl@staff.ichange.com> writes:
- >
- > > Sure, in my book Teach Yourself MORE C++ In 21 Days I show how to write a number of sorts, quicksort among them. Here's the
- > > basic code.
- > <code elided>
- > I hope this isn't what's in the book.
- >
- > For one thing, this code doesn't sort the elements of an array in the ordinary
- > sense. Rather, it sorts an array of pointers based on comparing the values
- > to which the pointers point.
-
- Yes, my point was not to supply the definitive code for qsort but to get him started looking at a somewhat simple working
- example. The book takes on the shortcoming you mention in subsequent discussion. You are right, however, in my haste I didn't
- make any of that clear in my message.
-
-
- > What I'm trying to argue is that good algorithms are not easy to design,
- > even when they appear simple. Libraries are there for a reason, and you
- > should use them whenever it makes sense.
-
-
- Agreed, and I didn't mean to suggest otherwise; rather that it makes sense to have a good idea of the fundamentals of how the
- sort works; optimization and creating a general solution is of course a much harder task. Thanks for your gentle reply. -j
-